import Vue from "vue";
import router from "./router";
import store from "./store/";
import App from "./App.vue";

import 'element-ui/lib/theme-chalk/index.css';
import httpUtils from "./utils/http.utils"
//element-ui
import Elementui from 'element-ui'
import echarts from 'echarts'
import {message} from './utils/resetMessage'
Vue.use(Elementui)
Vue.prototype.$message = message
import * as R from 'ramda'
Vue.prototype.R = R

Vue.use(httpUtils)
Vue.use(echarts)
Vue.prototype.$echarts = echarts

import moment from 'moment'
Vue.prototype.$moment = moment
// 公共组件
import Table from "./components/BaseTable.vue";
import Pagination from "./components/Pagination.vue";
import  FormSearch from "./components/FormSearch.vue";
import DialogView from '@/core/components/DialogView'
import CommonPic from '@/core/components/CommonPic'
Vue.component("Table", Table);
Vue.component("Pagination", Pagination);
Vue.component("FormSearch", FormSearch);
Vue.component("DialogView", DialogView);
Vue.component("CommonPic", CommonPic);
// 全局方法
import commonFun from './commonFun/index'
Vue.prototype.$funUtil = commonFun

// 接口
import axios from "./api/axios";
window.axios = axios;

// 引入公共样式
import {px2vw, px2vh, px2font} from './style/px2vw.js'
import "./style/common.less"

if (process.env.NODE_ENV == "development") {
  console.log("development mode");
  //开启debug模式
  Vue.config.debug = true;
}

// bus
import Bus from './bus'
Vue.prototype.$bus = Bus
import directive from '@/core/directive/directive'
Vue.use(directive)
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");
